<?php
/**
Exibe as informa��es que foram inseridas no formul�rio de cadastro do Servidor.
Ap�s confirmada, as informa��es ser�o inseridas no banco de dados.
*/

if( !function_exists('__autoload') )
{
    function __autoload($class_name) {
    require_once $class_name . '.php';
    }
}


// dados do formul�rio vindos de  ExibirCadastroservidor.php
$setorId = $_POST['setorId']; // id do setor vinculado ao funcion�rio
$usuarioservidor = $_POST['usuarioServidor'];
$senhaservidor = $_POST['senhaServidor'];
$cpf = $_POST['cpfServidor'];
$siape = $_POST['siapeServidor'];

if ($_POST['tipoPerfil'] == 0)
{
   $perfil = "Administrador";
}else if ($_POST['tipoPerfil'] == 1)
      {
         $perfil = "Funcion�rio";
      }else if ($_POST['tipoPerfil'] == 2)
            {
               $perfil = "Diretor";
            }else if ($_POST['tipoPerfil'] == 3)
                  {
                     $perfil = "DAP";
                  }
                  else if ($_POST['tipoPerfil'] == 4)
                       {
                          $perfil = "Compras";
                       }
                       else if ($_POST['tipoPerfil'] == 5)
                            {
                               $perfil = "Or�amento";
                            }
                  
$setor = new Setor( );
$setorSelecionado = $setor->CarregarSetor( $setorId ); // carrega as informa��es do setor
?>
<html>
           <head>
           <title>SAEO - Confirmar Cadastro de Servidor</title>
           <link rel='stylesheet' type='text/css' href='templates/estilos.css'>
           </head>
     <body class='body'>
     <form name='confirmar_cadastro_servidor' action='EnviarDadosServidor.php?operacao=1' method='post'>
     <table width='779' border='0' cellspacing='0' cellpadding='0' align='center' bgcolor='#FFFFFF'>
            <tr>
				<td><?php include "Topo.php"; ?></td>
			</tr>
            <tr>
                <td><div class='titulosTabelas' style='width:779; height:20; background:url(templates/tabela.jpg)'>CONFIRMAR CADASTRO DO FUNCION�RIO</div></td>
            </tr>
            <tr>
                <td colspan='2'>&nbsp;</td>
            </tr>
            <tr>
                <td><table class='tabela' width='650' border='0' cellspacing='0' cellpadding='0' align='center' bgcolor='#FFFFFF'>
                           <input type='hidden' name='servidorSenha' value='<?php echo $senhaservidor ?>'>
                           <tr>
                               <td>&nbsp;</td>
                           </tr>
                           <tr>
                               <td class='textoTabelas' width='15%'>&nbsp;Setor:</td>
                               <td class='textoTabelas'><?php echo $setorSelecionado->nome ?></td>
                               <input type='hidden' name='setorId' value='<?php echo $setorId ?>'>
                           </tr>
                           <tr>
                               <td>&nbsp;</td>
                           </tr>
                           <tr>
                               <td class='textoTabelas' width='15%'>&nbsp;Usu�rio:</td>
                               <td class='textoTabelas'><?php echo $usuarioservidor ?></td>
                               <input type='hidden' name='servidorUsuario' value='<?php echo $usuarioservidor ?>'>
                           </tr>
                           <tr>
                               <td colspan='2'>&nbsp;</td>
                           </tr>
                           <tr>
                               <td class='textoTabelas' width='15%'>&nbsp;Perfil:</td>
                               <td class='textoTabelas'><?php echo $perfil ?></td>
                               <input type='hidden' name='servidorPerfil' value='<?php echo $_POST['tipoPerfil'] ?>'>
                           </tr>
                           <tr>
                               <td colspan='2'>&nbsp;</td>
                           </tr>
                           <tr>
                               <td class='textoTabelas' width='15%'>&nbsp;CPF:</td>
                               <td class='textoTabelas'><?php echo $cpf ?></td>
                               <input type='hidden' name='servidorCPF' value='<?php echo $cpf ?>'>
                           </tr>
                           <tr>
                               <td colspan='2'>&nbsp;</td>
                           </tr>
                           <tr>
                               <td class='textoTabelas' width='15%'>&nbsp;SIAPE:</td>
                               <td class='textoTabelas'><?php echo $siape ?></td>
                               <input type='hidden' name='servidorSIAPE' value='<?php echo $siape ?>'>
                           </tr>
                           <tr>
                               <td colspan='2'>&nbsp;</td>
                           </tr>
                           <tr>
                               <td colspan='2' height='46'><div style='position:relative;left:220px'><img style='width:100px;height:30px;cursor:pointer;' src='templates/btvoltar.JPG' onclick='javascript: history.go(-1);'>&nbsp
                               <input type='image' style='width:100px;height:30px;' src='templates/btavancar.JPG'/></div></td>
                           <tr>
                     </table>
                </td>
            </tr>
            <tr>
                <td>&nbsp;</td>
            </tr>
            <tfoot>
                   <tr> 
					<?php include 'rodapeCreditos.php'; ?>
				</tr>
            </tfoot>
     </table>
     </form>
     </body>
     </html>